#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include<sys/stat.h>
int main(int argc,char *argv[])
{
	int fd = open(argv[1],O_RDONLY);
	if(fd<0)
	{
	       	perror("open");
		exit(EXIT_FAILURE);
	}
        int len=lseek(fd,0,SEEK_END);
	lseek(fd,0,SEEK_SET);
        char* str=(char *)malloc(len+1);
	read(fd,str,len);
	printf("%s",str);
	close(fd);
	return 0;
}
